package com.park.service;

import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.Map;


import com.park.model.FeeCriterion;
import com.park.model.Monthuser;
import com.park.model.Outsideparkinfo;
import com.park.model.Park;
import com.park.model.ParkRecordData;
import com.park.model.Parktoalipark;
import com.park.model.PosChargeData;
import com.park.model.StatisticData;

public interface PosChargeDataService {
	public List<Park> getParkByCountMoney(Map<String, Object> map);
	
	//娑撹閽╅崣锟�
	//缂佺喕顓搁幀鑽ょ應閺侊拷
	public String getByDateAndParkCountPayzbs(String startDate,String endDate);
	//缂佺喕顓搁幀濠氬櫨妫帮拷
	public String getByDateAndParkCountPayzje(String startDate,String endDate);
	//缂佺喕顓哥�圭偞鏁归柌鎴︻杺
	public String getByParkpaidMoneyjine(String startDate,String endDate);
	//缂佺喕顓搁崥鍕闁挾鐟弫锟�
	public String getByDateAndParkCountPayTypebs(String startDate,String endDate,int payType);
	//缂佺喕顓搁崥鍕闁捇鍣炬０锟�
	public String getByDateAndParkCountPayTypeje(String startDate,String endDate,int payType);
	
	public List<Park> getParkByMoney(Map<String, Object> map);
	
	//鐎涙劕閽╅崣锟�
	//缂佺喕顓搁幀鑽ょ應閺侊拷
	public String getByDateAndParkCountzbs(int parkId,String startDate,String endDate);
	//缂佺喕顓搁幀濠氬櫨妫帮拷
	public String getByDateAndParkCountzje(int parkId,String startDate,String endDate);
	//(娑撹閽╅崣鎵畱)缂佺喕顓哥�圭偞鏁归柌鎴︻杺
	public String getBypaidMoneyjine(int parkId,String startDate,String endDate);
	//缂佺喕顓搁崥鍕闁挾鐟弫锟�
	public String getByDateAndParkCountbs(int parkId,String startDate,String endDate,int payType);
	//缂佺喕顓搁崥鍕闁捇鍣炬０锟�
	public String getByDateAndParkCountje(int parkId,String startDate,String endDate,int payType);
	
	public PosChargeData getById(int id);		
	
	public List<PosChargeData> get();
	
	public List<PosChargeData> getUnCompleted();
	
	public List<PosChargeData> getPage(int low, int count);
	
	public List<PosChargeData> getByParkIdAndCardNumber(Integer parkId,String cardNumber);
	
	public Integer deleteByParkIdAndDate(int parkId, String startDate,String endDate);
	
	public List<PosChargeData> getPageByParkId(int parkId,int start,int count);
	
	public List<PosChargeData> getByParkAuthority(String userName);
	
	public List<PosChargeData> getPageArrearage(int low, int count);
	
	public List<PosChargeData> getByCardNumberAndPark(String cardNumber,Integer parkId);
	
	public List<PosChargeData> getByCardNumberAndParkName(String cardNumber,String parkName, Integer parkId);
	
	public List<PosChargeData> getPageArrearageByParkId(int parkId,int start,int count);
	
	public List<PosChargeData> getByRange(int parkId,Date startDate,Date endDate);
	
	public List<PosChargeData> getAllByDay(String date) throws ParseException;
	
	/*public List<PosChargeData> getByClearParking(String date,double other);*/
	
	public List<PosChargeData> getByParkAndDay(int parkId,String date) throws ParseException;
	
	public List<PosChargeData> getDebt (String cardNumber) throws Exception;
	
	//public List<PosChargeData> getDebtWithData(String cardNumber,List<Parktoalipark> parktoaliparks,List<Monthuser> monthusers,Park park,Boolean isMultiFeeCtriterion,int carType) throws Exception;

	public void calExpenseSmallCarWithData(PosChargeData charge, Date exitDate,Boolean isQuery,Park park,FeeCriterion criterion );
	
	public void calExpenseLargeCarWithData(PosChargeData charge, Date exitDate,Boolean isQuery,Park park,FeeCriterion criterion );
	
	public List<PosChargeData> getLastRecord(String carNumber,int count);
	
	public List<PosChargeData> getLastRecordUpdateInTime(int parkId,String carNumber,int count);
	
	public List<PosChargeData> getLastRecordWithPark(String carNumber,int count,int parkId);
	
	public List<PosChargeData> getDebt (String cardNumber,Date exitDate) throws Exception;
	
	public List<PosChargeData> getArrearageByCardNumber(String cardNumber);
	
	public List<PosChargeData> queryDebt (String cardNumber,Date exitDate) throws Exception;
	
	public PosChargeData newFeeCalcExpense(PosChargeData charge, Date exitDate,Boolean isQuery) throws Exception;
	
	public PosChargeData newFeeCalcExpenseWithData(PosChargeData charge, Date exitDate,Boolean isQuery,Park park,FeeCriterion criterion) throws Exception;;
	
	public PosChargeData newFeeCalcExpense1(PosChargeData charge,FeeCriterion criterion, Date exitDate,Boolean isQuery) throws Exception;
	
	public PosChargeData newFeeCalcExpense2(PosChargeData charge, FeeCriterion criterion,Date exitDate,Boolean isQuery) throws Exception;
	
	public List<PosChargeData> queryCurrentDebt (String cardNumber,Date exitDate) throws Exception;
	
	public List<PosChargeData> getParkCarportStatusToday(int parkId,Date tmpdate);
	
	public List<PosChargeData> getUnpaidChargeData(int parkId, Date startDate, Date endDate);
	public List<PosChargeData> getReviewList(int parkId,double other, Date startDate, Date endDate);
	public int count();
	
	public int gongcount();
	
	public int deleteById(int id);
	
	public int insert(PosChargeData item);
	
	public int update(PosChargeData item);
		
	public PosChargeData pay(String cardNumber, double money) throws Exception;
	
	public PosChargeData updateRejectReason(String cardNumber,String rejectReason) throws Exception;
	
	public List<PosChargeData> repay(String cardNumber, double money) throws Exception;
	
	public void calExpense(PosChargeData charge, Date exitDate,Boolean isQuery) throws Exception;
	
	public void calExpensewithData(PosChargeData charge, Date exitDate,Boolean isQuery,List<Monthuser> monthusers,Park park,FeeCriterion criterion) throws Exception;
	
	public void calExpenseType1(PosChargeData charge, Date exitDate,Boolean isQuery) throws ParseException;
	
	public void calExpenseSmallCar(PosChargeData charge, Date exitDate,Boolean isQuery) throws Exception;
	
	public void calExpenseLargeCar(PosChargeData charge, Date exitDate,Boolean isQuery) throws Exception;
	
	public List<PosChargeData> selectPosdataByParkAndRange(Date startDay, Date endDay,int parkId);
	
	public List<PosChargeData> selectPosdataByParkAndRangeAndCarportNumber(Date startDay, Date endDay,int parkId,int carportNumber);
	
	public Map<String, Object> getParkChargeByDay(int parkId, String day);
	
	public Map<String, Object> selectPosdataSumByParkAndRange(Date startDay, Date endDay,int parkId);
	
	//缂佺喕顓告禒濠冩）閺佺増宓侀崚妤勩�冮惃鍕安閺�璺虹杽閺�锟�
	public Map<String, Object> selectPosdataSumByParkAndRangeMoney(int id,String startDay, String endDay);
	
	public Map<String, Object> getParkChargeCountByDay(int parkId, String day);
	
	public Map<String, Object> calInByParkAndRange(int parkId, Date startDate, Date endDate);
	
	//缂佺喕顓告禒濠冩）閺佺増宓侀崚妤勩�冮惃鍕安閺�璺虹杽閺�锟�
	public Map<String, Object> calInByParkAndRangeMoney(Date startDate, Date endDate);
	
	public Map<String, Object> calOutByParkAndRange(int parkId, Date startDate, Date endDate);
	
	//缂佺喕顓告禒濠冩）閺佺増宓侀崚妤勩�冮惃鍕安閺�璺虹杽閺�锟�
	public Map<String, Object> calOutByParkAndRangeMoney(Date startDate, Date endDate);
	
	public List<PosChargeData> getByCardNumber(String cardNumber);
	
	public List<PosChargeData> getByCarNumberAndPN(String cardNumber,String parkName);
	
	public List<PosChargeData> getByParkDatetime(String cardNumber,String startDate,String endDate);
	
	public List<PosChargeData> getByParkName(String parkName);
	
	public List<PosChargeData> hardwareRecord(Integer parkId,String startDate,String endDate) throws ParseException, Exception;
	
	public List<Map<String, Object>> getFeeOperatorChargeData(Date startDate,Date endDate);

	List<PosChargeData> getByParkAndDayRange(int parkId, String startDate,String endDate) throws ParseException;

	List<PosChargeData> getAllByDayRange(String startDate, String endDate) throws ParseException;
	
	public Outsideparkinfo getOutsideparkinfoByOrigin(int parkId,String day);
	
	//缂佺喕顓告禒濠冩）閺佺増宓侀崚妤勩�冮惃鍕安閺�璺虹杽閺�锟�
	public Outsideparkinfo getOutsideparkinfoByOriginMoney(int id,String day);

	List<PosChargeData> getCharges(String cardNumber) throws Exception;
	
	public List<PosChargeData> getByCardNumberAndPort(String cardNumber,Integer portNumber);
	void calExpenseMulti(PosChargeData charge, Date exitDate, Boolean isQuery, Boolean isMultiFeeCtriterion, int carType)
			throws Exception;
	PosChargeData payWithOperatorId(String cardNumber, double money, String operatorId) throws Exception;
	List<PosChargeData> queryDebtWithParkId(String cardNumber, Date exitDate, Integer parkId) throws Exception;
	List<PosChargeData> getDebtWithParkId(String cardNumber, Date exitDate, Integer parkId) throws Exception;
	PosChargeData newFeeCalcExpense4(PosChargeData charge, FeeCriterion criterion, Date exitDate, Boolean isQuery,
			Park park) throws Exception;

	List<PosChargeData> getDebtWithData(String cardNumber, List<Parktoalipark> parktoaliparks,
			List<Monthuser> monthusers, Park park, Boolean isMultiFeeCtriterion, int carType, boolean isQuery,String expirationTime)
			throws Exception;

	public PosChargeData getByParkIdAndCardNumberAndDate(int parkId, String cardNumber, Date date);

	public List<PosChargeData> getAllByDayRangeV1(int parkId, String pastDay, String nowDay);

	public List<PosChargeData> getDebtWithDataV2(String cardNumber, List<Parktoalipark> parktoaliparks,
			List<Monthuser> monthusers, Park park, Boolean isMultiFeeCtriterion, int carType, boolean isQuery,
			String expirationTime) throws Exception;

	public List<PosChargeData> getByCardNumberAndParkV1(String plateNumber, int parkId);

	public int updateByParkIdAndPlateNumber(int parkId, String plateNumber, int couponType, Double couponMoney, String distributor);
	
	public PosChargeData selectPosChargeDataByYestDay(Date yestStartDay,Date yestEndDay);

	public ParkRecordData getByIdV1(int poschargeId);

	public int updatePicture(int id, String inUrl, String outUrl);

	public int updateById(int id, String format);

	public List<PosChargeData> getByParkIdAndCardNumberV2(int parkId, String cardNumber);

	public int updateByInvoice(int parkId, String cardNumber);

	public List<PosChargeData> getList(int parkId, String cardNumber, String startDate, String endDate, int i, int pageSize);

	public int getListAllCount(int parkId, String cardNumber, String startDate, String endDate);

	public List<Park> getParkByCardNumber(String cardNumber, String startDate, String endDate);

}
